package user;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import operation.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a1227
 * Date: 2022-10-04
 * Time: 17:03
 */
//管理端
public class Admin extends User {
    public Admin(String name) {
        this.name = name;
        this.iOperation = new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DisplayOperation()
        };
    }

    //继承于抽象类，需重写抽象类的抽象方法
    public int menu(){
        System.out.println("Hello " + name + "， Welcome to 管理端！");
        System.out.println("========管理端========");
        System.out.println("1.查阅书籍");
        System.out.println("2.增加书籍");
        System.out.println("3.删除书籍");
        System.out.println("4.打印书籍列表");
        System.out.println("0.退出");
        System.out.println("=====================");
        System.out.println("请选择:>");
        int choice = scanner.nextInt();
        return choice;
    }

}
